Repository navigation
feat(nav3): [Part 7] Add the built-in SerialName mapper - #6703
0xadam-brown wants to merge 2 commits into
Conversation
|
📲 Install BuildsAndroid
|
PR risk: not classifiedFor commit The last run ended with status |
| @@ -0,0 +1,15 @@ | |||
| # Versions for sentry-android-navigation3's kotlinx.serialization compatibility checks, registered as | |||
There was a problem hiding this comment.
nav3.versions.toml file alongside our libs.versions.toml.
It lets changes to the min supported kotlinx.serialization version automatically trigger the new R8 emulator tests (introduced in a later PR – not sure what my clanker was up to w/r/t these PR splits, but whatevs).
Those tests deliberately ignore changes confined to libs.versions.toml, since otherwise Dependabot’s frequent dependency bumps would each start an emulator run. GitHub’s path filters match whole files, so keeping the floor in that shared catalog would also exclude the changes we do need to test.
My clanker told me multiple version catalogs is a common convention, but chime in if you have concerns.
Alternatives
- Detect changes to the specific version entry in a CI job -> Would add workflow logic which was somewhat subtle and spread over both existing and new workflows.
- Require a manual run whenever the floor version changes -> Relies on one of us remembering, and we almost certainly won't.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8e69a38. Configure here.
| // unresolved, avoiding repeated lookups. Entries use UNKNOWN_ENTRY_NAME. | ||
| ExceptionUtils.rethrowIfFatal(t) | ||
| error = t | ||
| null |
There was a problem hiding this comment.
User serializer failures lack docs
Medium Severity
New broad Throwable catches wrap host-app serializer and descriptor code, then cache the type as unresolved. A failure is visible in Sentry only as /unknown, and the warning is logged only when debug is on. The KDoc points at a troubleshooting section in sentry-docs, but this PR does not link a docs PR and the docs checkbox is unchecked, so customers have no documented way to learn that their serializer is what broke naming.
Additional Locations (2)
Triggered by project rule: PR Review Guidelines for Cursor Bugbot
Reviewed by Cursor Bugbot for commit 8e69a38. Configure here.


PR Stack (Nav3 Serial Name Mappers)
📜 Description
PR introduces the simpler of our two built-in
BackStackEntryMappers, viz.,SerialName. Apps can pass it toSentryNavEffectinstead of maintaining a mapping for every nav destination. Names come from serialization descriptors. No entry properties are collected.Serializer lookup depends on the host app’s types, serialization runtime, and R8 config. This PR adds compatibility probing, cached per-type lookup results, and diagnostic warnings.
Entries that can't be named remain in the recorded back stack as "/unknown"; a failure involving one app type does not disable naming for other types.
The SDK compiles and tests against kotlinx.serialization 1.7.3 without imposing that version on host apps. The floor lives in a separate version catalog so later R8 coverage can run automatically when it changes without running for every unrelated dependency bump.
💡 Motivation and Context
Apps that use kotlinx.serialization already give each serializable route a name that does not depend on its obfuscated runtime class name. Reusing that naming contract avoids requiring applications to write a mapper for every route type.
addresses: JAVA-787 (link)
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Continue with PR 8: Define bounded property encoding.